<div class="dux-page-header am-cf">
    <div class="page-title">
        <a class="am-btn am-btn-primary" href="{url('index')}"> 等级列表</a>
    </div>
    <div class="page-action">
        <a class="am-btn am-btn-danger" href="javascript:location.reload();"><i class="am-icon-refresh"></i></a>
    </div>
</div>
<div class="dux-body">
    <div class="am-panel am-panel-default dux-panel">
        <div class="am-panel-hd">{$assignName}等级</div>
        <div class="am-panel-bd">
            <form class="am-form  am-form-horizontal dux-form" data-dux="form-bind" method="post">
                <fieldset>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">等级名称</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <input type="text" name="name" value="{$info.name}" placeholder="请输入等级名称" minlength="1" required>
                        </div>
                    </div>

                    <!--for{$i = 1; $i <= $saleConfig.sale_level; $i++}-->
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">{$i}级佣金</label>
                        <div class="am-u-md-10 am-u-sm-12">

                            <div class="am-g am-g-collapse">
                                <div class="am-u-sm-6">
                                    <div class="am-input-group">
                                        <input type="text" name="comm_rate[{$i}][rate]" value="{$info['comm_rate'][$i]['rate']}" placeholder="佣金百分比比例" >
                                        <span class="am-input-group-label">% 或</span>
                                    </div>
                                </div>
                                <div class="am-u-sm-6">
                                    <div class="am-input-group">
                                        <input type="text" name="comm_rate[{$i}][money]" value="{$info['comm_rate'][$i]['money']}" placeholder="佣金固定金额" >
                                        <span class="am-input-group-label">元</span>
                                    </div>
                                </div>
                            </div>


                        </div>
                    </div>
                    <!--{/for}-->
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">升级条件</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <div class="am-input-group">
                                <span class="am-input-group-label">{$levelWhereText[$saleConfig['level_type']]}满</span>
                                <input type="text" name="level_where" value="{$info.level_where}" placeholder="升级条件" >
                            </div>
                            <div class="am-form-help">满足指定条件进行升级</div>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">特殊组</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <div>
                                <select name="special" data-am-selected="{btnWidth: '100%'}" required>
                                    <option value="1" <!--if{$info['special']}--> selected <!--{/id}--> >不参与升级</option>
                                    <option value="0" <!--if{!$info['special']}--> selected <!--{/id}--> >参与升级</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <div class="am-u-sm-offset-12 am-u-md-offset-2">
                            <input type="hidden" name="level_id" value="{$info.level_id}">
                            <button class="am-btn am-btn-primary" type="submit" disabled>保存</button>
                        </div>
                    </div>

                </fieldset>
            </form>
        </div>
    </div>
</div>